<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ include file="/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="${base}/css/health.css" />
		<title>Breaking Fast</title>
		<script type="text/javascript">
			function loginModel() {
				new Boxy("<iframe id='loginWin' name='loginWin' height='550px' width='1000px' src='${base}/frontUserCtl/toRegister'></iframe>",{title:"注册登陆", modal: true});
 			}
 			
			$(function() {
				$("#loginForm").submit(function(){
					var email = $("#email").val();
					var password = $("#password").val();
					if(null == email || "" == email) {
						jAlert("<spring:message code='loginempty' />");
						return false;
					} else if(null == password || "" == password) {
						jAlert("<spring:message code='loginempty' />");
						return false;
					} else {
						return true;
					}
				});
			});
		</script>
	</head>
	
	<body>
		<div class="main">
			<div class="nav">
				<p></p>
				<ul class="leaf">
	       	    	<li>Real Food</li>
	                <li>Healthy</li>
	                <li>Easy to get</li>
				</ul>
				<c:if test="${null == frontCurrentUser}">
		            <div class="login_alert">
		            	<ul>
		                	<li class="flip"><a href="#" onclick="loginModel()"><spring:message code="login" />/<spring:message code="register" /></a></li>
							<li class="china"><a href="${base }/i18nCtl/language?locale=zh_CN">中文</a><a href="${base }/i18nCtl/language?locale=en_US">/English</a></li>
		                </ul>
		            </div>
		            <div class="panel">
		            	<form:form id="loginForm" method="post" action="${base}/frontUserCtl/userLogin">
			            	<ul>
			                	<li><spring:message code="username" />：</li>
			                    <li><input type="text" id="email" name="email" class="text_dl" /></li>
			                    <li><spring:message code="password" />：</li>
			                    <li><input type="password" id="password" name="password" class="text_dl" /></li>
			                    <li><input type="submit" value="<spring:message code='login' />" class="btn_dl" /></li>
			                </ul>
		                </form:form>
		            </div>
	            </c:if>
	            <c:if test="${null != frontCurrentUser}">
		            <div class="login_alert">
		            	<ul>
		                	<li class="flip"><a href="#" onclick="location.href='${base}/frontUserCtl/userLogout'"><spring:message code="logout" /></a></li>
	                    	<li><spring:message code="hello" />！<a href="#" onclick="location.href='${base}/userinfo'">${frontCurrentUser.username }</a></li>
							<li class="china"><a href="${base }/i18nCtl/language?locale=zh_CN">中文</a><a href="${base }/i18nCtl/language?locale=en_US">/English</a></li>
		                </ul>
		            </div>
	            </c:if>
			</div>
			<div class="title">
               	<jsp:useBean id="now" class="java.util.Date" />
               	<p><span>今天<fmt:formatDate value="${now}" pattern="M月d日" />，Got your diary today?</span></p>
            </div>
			<div class="nav_02">
				<ul>
					<li class="color_01"><a href="${base}/index">首页</a></li>
					<li class="color_02"><a href="${base }/waresFrontCtl/menuInfo">菜单及订餐</a></li>
					<li class="color_03"><a href="#">试餐</a></li>
					<li class="color_04"><a href="#">享受折扣</a></li>
					<li class="color_05"><a href="${base}/health1">了解健康信息</a></li>
					<li class="color_06"><a href="${base}/orderinput">配送范围</a></li>
		        </ul>
		    </div>
    		<div style=" margin:0 auto; width:920px;"><img src="${base }/images/warn_500.jpg" alt="" /></div>
		    <div class="footer">
				<ul>
					<li><a href="#" target="_blank">关于BF</a></li>
		            <li>|</li>
		            <li><a href="#" target="_blank">FAQ</a></li>
		            <li>|</li>
		            <li><a href="#" target="_blank">联系我们</a></li>
				</ul>
			</div>
			<div class="footer_bg"></div>
		</div>
	</body>
</html>